package me.jessyan.mvparms.demo.mvp.model.logic.api;


import java.util.List;

/**
 * request:
 * 在线音乐 APP 接口 控制接口:
 * 1. 播放上一首
 * 2. 播放下一首
 * 3. 暂停播放
 * 4. 恢复播放
 * 5. 设置播放模式(单曲循环,列表循环,随机播放)
 * <p>
 * 语音相关接口
 * 1. 打开语音(开关)
 * 2. 关闭语音(开关)
 * 3. 修改默认唤醒词
 */
public class BusClientData {

    /**
     * 示例数据结构
     * <p>
     * {
     * music
     * {
     * mode:"单曲循环/列表循环/随机播放",
     * cmd:"下一首/上一首/暂停/播放"
     * }
     * <p>
     * voice
     * {
     * status:"open/close",
     * wakeupwords
     * [
     * {
     * name:"你好南尔",
     * py:"ni hao nan er",
     * threshold:"0.18"
     * }
     * {
     * name:"南尔南尔",
     * pinyin:"nan er nan er",
     * threshold:"0.18"
     * }
     * ...
     * ]
     * }
     *
     * <p>
     * }
     */


    public static String MUSCI_NEXT = "next";//下一首
    public static  String MUSIC_PAUSE = "pause";//暂停
    public static  String MUSCI_PLAY = "play";//播放
    public static  String MUSCI_PREVIOUS = "previous";//上一首
    public static  String LIST_LOOP = "list_loop";//列表循环
    public static   String SINGLE_CYCLE = "single_cycle";//单曲循环
    public static  String RANDOM = "random";//随机播放




    private Music music;
    private Voice voice;

    public Music getMusic() {
        return music;
    }

    public void setMusic(Music music) {
        this.music = music;
    }

    public Voice getVoice() {
        return voice;
    }

    public void setVoice(Voice voice) {
        this.voice = voice;
    }

    public static class Music {
        private String mode;
        private String cmd;

        public String getMode() {
            return mode;
        }

        public void setMode(String mode) {
            this.mode = mode;
        }

        public String getCmd() {
            return cmd;
        }

        public void setCmd(String cmd) {
            this.cmd = cmd;
        }

        @Override
        public String toString() {
            return "Music{" +
                    "mode='" + mode + '\'' +
                    ", cmd='" + cmd + '\'' +
                    '}';
        }
    }


    public static class Voice {
        private String status;

        private List<Wakeupwords> wakeupwords;

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public List<Wakeupwords> getWakeupwords() {
            return wakeupwords;
        }

        public void setWakeupwords(List<Wakeupwords> wakeupwords) {
            this.wakeupwords = wakeupwords;
        }

        @Override
        public String toString() {
            return "Voice{" +
                    "status='" + status + '\'' +
                    ", wakeupwords=" + wakeupwords +
                    '}';
        }

        public static class Wakeupwords {

            private String name;
            private String pinyin;
            private String threshold;

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getPinyin() {
                return pinyin;
            }

            public void setPinyin(String pinyin) {
                this.pinyin = pinyin;
            }

            public String getThreshold() {
                return threshold;
            }

            public void setThreshold(String threshold) {
                this.threshold = threshold;
            }

            @Override
            public String toString() {
                return "Wakeupwords{" +
                        "name='" + name + '\'' +
                        ", pinyin='" + pinyin + '\'' +
                        ", threshold='" + threshold + '\'' +
                        '}';
            }
        }
    }

    @Override
    public String toString() {
        return "BusClientData{" +
                "music=" + music +
                ", voice=" + voice +
                '}';
    }
}
